package com.hrcx.mystery.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hrcx.mystery.pojo.EbMysteryUserBoxArk;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * @author LinXiPeng
 */
public interface EbMysteryUserBoxArkMapper extends BaseMapper<EbMysteryUserBoxArk> {
    /**
     * 用户该盒开启机会-1
     *
     * @param bid 盒子编号
     * @param uid 用户编号
     */
    @Update("update eb_mystery_user_box_ark set count=count-1 where bid=#{bid} and uid=#{uid}")
    void decrease(@Param("bid") Integer bid, @Param("uid") Integer uid);
}